import Vue from 'vue'
import Router from 'vue-router'

import login from '@/pages/pcs/login'
import manage from '@/pages/pcs/manage'
import home from '@/pages/pcs/home'
import iframe from '@/pages/pcs/iframepage'

import * as config from '../config/const';

Vue.use(Router);


export default new Router({
  // mode:'history',
  data(){
    return {

    }
  },
  routes: [
    {
      path: '/',
      name: 'login',
      component: login,
      meta:{
      }
    },
    {
      path: '/login',
      name: 'login',
      component: login,
      meta:{
      }
    },
    {
      path: '/admin',
      component:manage,
      name:'manage',
      children:[
        {
          path:'',
          name:'home',
          component:home,
          meta:{
            title:'首页',
            filter:config.AUTH_FILTER.admin
          }
        },{
          path: '/frame/:backurl',
          name: 'iframe',
          component:iframe,
          meta:{
            title:'外链页面'
          }
        }
      ]
    }
  ]
})
